#ifndef __TCP_TEST_H__
#define __TCP_TEST_H__

#include <pthread.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <sys/types.h>          /* See NOTES */
#include <arpa/inet.h>
#include <lwip/sockets.h>
#include <time.h>

struct Tcp_Struct
{

    int (*Send)(unsigned char *, unsigned int );
    int (*Recv)(unsigned char *, unsigned int);
    int (*ServerInit)();
    int (*Connect)();
    int (*Setlete)(int, fd_set *, fd_set *, fd_set *, struct timeval *);
    int (*Close)();
    int (*GetSendBuf)(int);
    int (*SetSendBuf)(int, int);
    int (*GetRecvBuf)(int);
    int (*SetRecvBuf)(int);
    
    /*****************************/
    int  m_socket;
    
    
    int m_Switch;
}Tcp_Struct;

struct Tcp_Struct *Tcp_Instance();

int Tcp_Statr();
int Tcp_ServerInit(const char *addr);
int Tcp_Connect(const char *addr);
int Tcp_Send(unsigned char *buffer, unsigned int Length);

#define g_TcpManger (*Tcp_Instance())



#endif
